//
//  Anktool.h
//  ainkjj
//
//  Created by zhiyiLiu on 2020/3/2.
//  Copyright © 2020 zhiyiLiu. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface Anktool : NSObject
+ (NSString *)strBlankHolder:(NSString *)string;
+ (BOOL)strIsBlank:(NSString *)string;
+ (BOOL)is_num_alpha:(NSString *)string;
+ (BOOL)checkPassword:(NSString *) password;

+ (NSString *)wendu:(NSInteger)searchNum;

//将十进制转化为十六进制
+ (NSString *)DecimalToHex:(int)tmpid;

// 将NSData转换成十六进制的字符串
+ (NSString *)convertDataToHexStr:(NSData *)data;

/// 生成一张指定 从颜色a到颜色b，线性渐变的图片

+ (UIImage *)gradient_img_create:(UIColor *)fromColor toColor:(UIColor *)toColor frame:(CGRect)frame;
/**
 //作者：梦里挑灯看键
 //链接：http://www.jianshu.com/p/117919c5e20b
 //來源：简书
 //著作权归作者所有。商业转载请联系作者获得授权，非商业转载请注明出处。
 使用 boundingRectWithSize：计算文字高度不准确的问题
 
 @param size <#size description#>
 @param font <#font description#>
 @param text <#text description#>
 @return <#return value description#>
 */
+ (CGSize)boundingRectWithSize:(CGSize)size font:(UIFont *)font text:(NSString *)text numberOfLines:(NSInteger)lines;
/**
 *  获取当前的屏幕展示的控制器
 *
 *  @return 控制器
 */

+ (UIViewController *)getCurrentVC;

//获取视图的控制器
+ (UIViewController*)viewControllerForView:(UIView *)view;
+ (NSMutableAttributedString *)stringWithNum:(NSString *)numStr fontSize:(CGFloat)numFontSize color:(UIColor *)numColor text:(NSString *)text textFontSize:(CGFloat)textFontSize textColor:(UIColor *)textColor numFirst:(BOOL)flag;
;

+ (NSMutableAttributedString *)begin:(NSString *)begin begin_fontSize:(CGFloat)begin_fontSize begin_color:(UIColor *)begin_color cishu_num:(NSString *)cishu_num cishu_numFontSize:(CGFloat)cishu_numFontSize cishu_num_textColor:(UIColor *)cishu_num_textColor shegnjiang_img:(NSString *)shengjiang_img;

#pragma mark - ==================  分享 ==================
+ (void)fenxiangTopic:(NSInteger)topicId name:(NSString *)name desc:(NSString *)desc currentView:(UIView *)view;
@end

NS_ASSUME_NONNULL_END
